import { apiPrefix } from '@/consts/consts'

export default ({ $service:request }) => ({
  // 4.5.15. 客户联系人列表
  contactList(params) {
    return request({
      url: `${apiPrefix}/api/v1/customer/contact/list`,
      method: 'get',
      params
    })
  },

  // 4.5.16. 添加客户联系人
  contactAdd(data) {
    return request({
      url: `${apiPrefix}/api/v1/customer/contact/add`,
      method: 'post',
      data
    })
  },
  
  // 4.5.17. 修改客户联系人
  contactUpdate(data, id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/contact/update/${id}`,
      method: 'put',
      data
    })
  },
    
  // 4.5.18. 删除客户联系人
  contactDelete(id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/contact/delete/${id}`,
      method: 'delete',
    })
  },

})
